package com.kzw.bean;

/**
 * 实体类：与数据库表对应 最好实体类的属性名称与数据库表字段名称要一致 如果不一致，则需要在sql语句中使用as给字段取别名，使结果集中的字段名与属性名相同
 * select id as oid, name as uname, age from tb_user;
 */
public class User {

	private Long id;
	private String name;
	private int age;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return String.format("User[%d, %s, %d]", id, name, age);
	}

}
